moji chooser: Try harder to avoid fallback
authorMatthias Clasen <mclasen@redhat.com>
Thu, 19 Jul 2018 21:50:54 +0000 (17:50 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 20 Jul 2018 00:51:07 +0000 (20:51 -0400)
We don't want to see any fallback rendering.
The current check was still letting some fallback
combinations through.

Based on work by Julian Sparber.

gtk/gtkemojichooser.c

index 64ec1959ceb2e47607e5b45f89cab7288488951b..68cabda67e0268cc231a1adf974dd910ea373a1f 100644 (file)
@@ -404,7 +404,7 @@ add_emoji (GtkWidget    *box,
   pango_layout_get_extents (layout, &rect, NULL);
 
   /* Check for fallback rendering that generates too wide items */
-  if (rect.width >= 2 * chooser->emoji_max_width)
+  if (rect.width >= 1.5 * chooser->emoji_max_width)
     {
       gtk_widget_destroy (label);
       return;